﻿using System;
using Xtensive.Orm;

namespace SqlCustomCompiler.Model
{
  [HierarchyRoot]
  public class Message : Entity
  {
    [Key, Field]
    public string Id { get; private set; }

    [Field]
    public string Text { get; private set; }

    public Message(Session session, string text)
      : base(session)
    {
      if (string.IsNullOrEmpty(text))
        throw new ArgumentNullException("text");
      Text = text;
    }
  }
}